package com.qingke.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qingke.mapper.LearningNoteMapper;
import com.qingke.pojo.LearningNote;
import com.qingke.service.LearningNoteService;
@Service("learningNoteService")
public class LearningNoteServiceImpl implements LearningNoteService {
    @Resource
	private LearningNoteMapper lnDao;
	
	public int saveLearningNote(LearningNote record) {
		return lnDao.insertSelective(record);
	}

	public int softDelete(int id) {
		return lnDao.softDelete(id);
	}

	public LearningNote getLearningNoteById(int id) {
		return lnDao.selectByPrimaryKey(id);
	}

	public List<LearningNote> listLearningNoteByStudentId(int studentId) {
		return lnDao.listLearningNoteByStudentId(studentId);
	}

	public int updateLearningNote(LearningNote record) {
		return lnDao.updateByPrimaryKeySelective(record);
	}

}
